//
//  ZHFNavgationController.swift
//  zhihuifan
//
//  Created by apple on 2017/8/10.
//  Copyright © 2017年 youyou. All rights reserved.
//

import UIKit

class ZHFNavgationController: UINavigationController {

    override func viewDidLoad() {
        super.viewDidLoad()
        //设置navbar
       setupNavBar()
        
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
fileprivate extension ZHFNavgationController{
    func setupNavBar(){
                for v in navigationBar.subviews {
                    for sbv in v.subviews {
                        if sbv.isKind(of: UIVisualEffectView.classForCoder()) {
        
                            for ssbv in sbv.subviews {
                                ssbv.removeFromSuperview()
                            }
                        }
                    }
                }
        
        navigationBar.barTintColor = #colorLiteral(red: 0.9623453021, green: 0.3833797276, blue: 0.2614961267, alpha: 1)
        navigationBar.isTranslucent = false
        navigationBar.titleTextAttributes = [NSFontAttributeName:UIFont.systemFont(ofSize: 18)]
        navigationBar.titleTextAttributes = [NSForegroundColorAttributeName:UIColor.white]
//        navigationBar.setBackgroundImage(UIImage(named:"tupian"), for: UIBarMetrics.default)
    }
}
